
<div class="page">
	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="demo/view/view_add.html" target="dialog" rel="entity_add" width="750" height="540"><span>添加</span></a></li>
				<li><a class="delete" url="/demo/view/{view_id}" area="tbody.list" callback="reload" type="delete" target="navTabTodo" title="确定要删除选中的数据吗？" warn="请选择需要删除的数据项！"><span>删除</span></a></li>
				<!-- 	
				<li><a class="edit" href="demo_page4.html?uid={sid_user}" target="navTab" warn="请选择一个用户"><span>修改</span></a></li>
				<li class="line">line</li>
				<li><a class="icon" href="#"><span>导入EXCEL</span></a></li>
				 -->
			</ul>
		</div>
		
			<table class="list" width="98%" layoutH="54">
				<thead>
					<tr>
						<th width="25"><input type="checkbox" name="objectId" value="view_id"/></th>
						<th width="80">编号</th>
						<th width="100">id</th>
						<th width="100">视图标题</th>
						<th>内容container</th>
						<th>模板templet</th>
						<th>模型demo</th>
						<th>统计sign</th>
						<th>对应实体clazz</th>
						<th>描述</th>
						<th align="right">操作</th>
					</tr>
				</thead>
				<tbody style="display: none;" class="templet">
					<tr view="${view_id}">
						<td><input type="checkbox" name="view_id" value="${view_id}"/></td>
						<td>${num}</td>
						<td>${view_id}</td>
						<td name="title" title="${title}">${title}</td>
						<td name="container" title="${container}">${container}</td>
						<td name="templet" title="${templet}">${templet}</td>
						<td name="demo" title="${demo}">${demo}</td>
						<td name="sign">${sign}</td>
						<td name="clazz">${clazz}</td>
						<td name="description" title="${description}">${description}</td>
						<td>
							<a class="edit" href="javascript:void(0)" url="demo/view/view_update.html?view_id=${view_id}" target="dialog" warn="非法参数（${view_id}）" width="750" height="600" callback="updateViewItem"><span>修改</span></a>
						</td>
					</tr>
				</tbody>
				<tbody class="list" action="/demo/view">
					
				</tbody>
			</table>
		
		<div class="panelBar">
			<div class="pages"></div>
			<div class="pagination" totalCount="0" numPerPage="20" pageNumShown="10" currentPage="1"></div>
		</div>
	
	</div>
</div>
<script>
function updateViewItem(item){
	var table=$("table.list");
	var view=$("tr[view="+item.view_id+"]",table);
	view.find("td[name=title]").text(item.title);
	view.find("td[name=container]").text(item.container);
	view.find("td[name=templet]").text(item.templet);
	view.find("td[name=demo]").text(item.demo);
	view.find("td[name=sign]").text(item.sign);
	view.find("td[name=clazz]").text(item.clazz);
	view.find("td[name=description]").text(item.description);
	alertMsg.correct("更新成功");
}
</script>